
package com.ruoyi.data;


import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.data.domain.ParameterSingleT;
import com.ruoyi.data.service.IParameterSingleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Component
public class ControlTool extends BaseController
{


	@Autowired
	private IParameterSingleService parameterSingleService;

	public static ControlTool controlTool;

	@PostConstruct
	public void init() {
		controlTool = this;
		controlTool.parameterSingleService = this.parameterSingleService;
	}

	/**
	 * 获取单值参数
	 */
	public ParameterSingleT getParamVal(String code){
		ParameterSingleT vo = new ParameterSingleT();
		vo.setParamCode(code);
		vo = controlTool.parameterSingleService.getSysParams(vo);
		return vo;
	}

}